<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="description" content=""/>
    <meta name="author" content=""/>

    <title>客户下单页面</title>

    <!-- Bootstrap core CSS -->
    <link href="https://cdn.bootcss.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"/>
    <style>
        .one{
            color: #ffffff;
        }
        .one:hover{
            text-decoration: none;
            color: #0066ff;
        }
        .col-md-4{
            border-right: #FF8C00 solid 1px;
        }
        .col-md-4 a.btn:hover{
            background: #0066ff;
            border: none;
        }
        .container-fluid{
            margin: 0 auto;
            text-align: center;
            margin-top: 56px;

        }
    </style>
</head>
<body>
<!-- 导航条-->
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark" style="padding-left: 200px">
    <a class="navbar-brand" href="#">跑腿者联盟</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarsExampleDefault">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a class="nav-link" th:href="@{/order/index}">我要下单 <span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" th:href="@{/order/lists}">我的订单</a>
            </li>
            <li class="nav-item" th:if="${session.customer.type ==2}">
                <a class="nav-link" th:href="@{/order/lists2}">我的配送</a>
            </li>

        </ul>

        <a class="btn btn-link one" th:if="${session.customer != null}" th:href="@{/customer/profile}"
           th:text="${session.customer.nickname}"></a>
        <a style="padding-right: 200px" class="btn btn-link one" th:if="${session.customer != null}" th:href="@{/publiz/logout}">注销</a>

    </div>
</nav>

<div class="container-fluid" >
    <div class="row">
        <h5 class="display-4" style="margin: 0 auto;margin-bottom: 10px;">我的订单</h5>
        <table class="table" style="margin: 0 auto">
            <thead>
            <tr>
                <th>#</th>
                <th>订单类型</th>
                <th>收货人姓名</th>
                <th>收货人电话</th>
                <th>送货人姓名</th>
                <th>送货人电话</th>
                <th>帮送/买/取物品</th>
                <th>取货地址</th>
                <th>买货商店</th>
                <th>订单状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="item : ${page.content}">
                <td>#</td>
                <td>
                    <span th:if="${item.type == 1}">帮买</span>
                    <span th:if="${item.type == 2}">帮送</span>
                    <span th:if="${item.type == 3}">帮取</span>
                </td>
                <td th:text="${item.consignee}">#</td>
                <td th:text="${item.consigneeMobile}">#</td>
                <td th:text="${item.consigner}">#</td>
                <td th:text="${item.consignerMobile}">#</td>
                <td th:text="${item.goods}">#</td>
                <td th:text="${item.pickupAddress}">#</td>
                <td th:text="${item.store}">#</td>
                <td>
                    <span th:if="${item.status == 1}">下单成功</span>
                    <span th:if="${item.status == 2}">已指派</span>
                    <span th:if="${item.status == 3}">配送中</span>
                    <span th:if="${item.status == 4}">已送达</span>
                    <span th:if="${item.status == 5}">已收货</span>
                    <span th:if="${item.status == 6}">已评价</span>
                </td>
                <td>
                    <a th:href="@{/order/detail(id=${item.id})}">详情</a>
                    <a th:href="@{/order/confirm(id=${item.id})}">确认收货</a>
                    <a th:href="@{/order/evaluate(id=${item.id})}">评价</a>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="11">
                    <a th:href="@{/order/lists(start=0)}">[首页]</a>&nbsp;&nbsp;
                    <a th:if="${not page.isFirst()}" th:href="@{/order/lists(start=${page.number-1})}">[上页]</a>&nbsp;&nbsp;
                    <a th:if="${not page.isLast()}" th:href="@{/order/lists(start=${page.number+1})}">[下页]</a>&nbsp;&nbsp;
                    <a th:href="@{/order/lists(start=${page.totalPages-1})}">[末页]</a>
                </td>
            </tr>
            </tfoot>
        </table>
    </div>

</div>
<hr/>
<footer class="container">
    <p>© 2017-2018 跑腿者联盟</p>
</footer>


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</body>
</html>
